package xhwl.insurance.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.insurance.http.ApiService;
import xhwl.retrofitrx.BaseApi;

/**
 * Created by fuyi on 2017/11/30.
 */

public class ArtificialServiceListApi extends BaseApi {
    ArtificialServiceListReq req;

    public ArtificialServiceListApi(String member_id,int page_num){
        req=new ArtificialServiceListReq(member_id,page_num);
        setShowErrorMsg(false);
    }
    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).getArtificialServiceList(requestBody);
    }
    private class ArtificialServiceListReq{
        private String member_id;
        private int page_num;

        public ArtificialServiceListReq(String member_id,int page_num) {
            super();
            this.member_id=member_id;
            this.page_num=page_num;
        }


    }
}
